<%@ Import Namespace="System.Data" %>
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Runtime>" %>
<%@ Import Namespace="Ornament.NHibernates.Configurations" %>

<script type="text/C#" runat="server">
    private static IEnumerable<SelectListItem> Isolations()
    {
        var s = new List<SelectListItem>();
        foreach (IsolationLevel isolation in Enum.GetValues(typeof(IsolationLevel)))
        {
            s.Add(new SelectListItem() { Text = isolation.ToString(), Value =isolation.ToString()});
        }
        return s;
    }
</script>

<div class="cssform">
    <p>
        <label>
            Timeout:</label>
        <%=Html.TextBoxFor(e=>e.Timeout)%>
    </p>
    <p>
        <label for="ShowSql">
            Show Sql:</label>
        <%=Html.CheckBoxFor(e=>e.ShowSql) %>
    </p>
    <p>
        <label for="UseOuterJoin">
            Use Outer Join:</label>
        <%=Html.CheckBoxFor(e=>e.UseOuterJoin) %>
    </p>
    <p>
        <label>
            Isolation:</label>
        <%=Html.DropDownListFor(e=>e.Isolation,Isolations())%>
    </p>
    <p>
        <label>
            BatchSize:</label>
        <%=Html.TextBoxFor(e=>e.BatchSize)%>
    </p>
</div>
